package com.example.demo.service.imp;

import com.example.demo.dao.IUser;
import com.example.demo.entity.User;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional
public class UserServiceImp implements UserService {

    @Autowired
    private IUser iUser;

    @Override
    public int insertUser(User user) {
        return iUser.insertUser(user);
    }

    @Override
    public int deleteUserById(int id) {
        return iUser.deleteUserById(id);
    }

    @Override
    public int updateUser(User user) {
        return iUser.updateUser(user);
    }

    @Override
    public List<User> selectAllUser() {
        return iUser.selectAllUser();
    }

    @Override
    public User selectUserById(int id) {
        return iUser.selectUserById(id);
    }

    @Override
    public User selectUserById2(int id) {
        return iUser.selectUserById2(id);
    }

    @Override
    public int addUserStrengthen(User user) {
        return iUser.addUserStrengthen(user);
    }

    @Override
    public List<User> selectUserCondition(User user) {
        return iUser.selectUserCondition(user);
    }

    @Override
    public List<User> selectUserInIds(User user) {
        return iUser.selectUserInIds(user);
    }
}
